#ifndef WIDGET_H
#define WIDGET_H

#include <QMenu>
#include <QWidget>
#include "wxapi.h"
#include "voicerec.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

    bool eventFilter(QObject *watched, QEvent *event) override;

protected:

private slots:
    void display(QString);

private:
    Ui::Widget *ui;
    wxapi *doubao;
    QMovie *recordMovie;
    QMovie *loadMovie;
    QMenu *quit;
    bool mouseStatus;
    QPoint posOffset;

    voiceRec *voice_rec;
    bool abort_flag;
    QTimer timer;

signals:
    void send_pcmData_to_doubao(QByteArray);

};
#endif // WIDGET_H
